<template>
  <el-table-column
      v-bind="$attrs"
      v-on="$listeners"
      :show-overflow-tooltip="showOverflowTooltip"
      :visible="visible"
  >
<!--    <template :slot="item.name"  v-for="item in scopedSlots" slot-scope="scope">-->
<!--      <slot :name="item.name" ></slot>-->
<!--    </template>-->

    <template v-for="(index, name) in $slots" :slot="name">
      <slot :name="name"></slot>
    </template>
    <template v-for="(index, name) in $scopedSlots"  slot-scope="scope">
      <slot :name="name" v-bind="scope"></slot>
    </template>
  </el-table-column>
</template>

<script>
export default {
  name: "MTableColumn",
  data() {
    return {
      scopedSlots: []
    }
  },
  props:{
    showOverflowTooltip:{
      type: Boolean,
      default: true
    },
    visible: {
      type: Boolean,
      default: true
    }
  },
  components: {},
  mounted() {
    for(var key in this.$scopedSlots){
      this.scopedSlots.push({
        name: key,
        data:  this.$scopedSlots[key]
      })
    }
  },
  methods: {
  }
}
</script>

<style lang="scss" scoped>

</style>
